#ifndef COMBINATORY_POLICY_H
#define COMBINATORY_POLICY_H

#include "aso-core/observer.h"
#include "aso-core/antiviral_set.h"

typedef Observer<Avs, bool> CombinationObserver;

enum CombinationStatusType
{
    Success,
    Error         //fallo virologico
};

struct CombinationStatus
{
    std::string name;
    CombinationStatusType status;
    //!Constructor
    CombinationStatus(const std::string& name, CombinationStatusType status)
        : name(name), status(status)
    {}

    CombinationStatus()
        : name(), status(Success)
    {}
};

class CombinatoryPolicy
{
    const std::string name;
public:
    //!Constructor
    CombinatoryPolicy(const std::string& name)
        : name(name)
    {}

    inline const std::string& get_name() const
    {
        return name;
    }

    virtual bool combine(const Avs& elements, CombinationObserver* observer, CombinationStatus& status) = 0;
};

#endif
